home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat5 / extacct.z / extacct
Encoding:
Text File  |  1998-10-20  |  10.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. eeeexxxxttttaaaacccccccctttt((((5555))))                                                          eeeexxxxttttaaaacccccccctttt((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      extacct - introduction to IRIX extended accounting features
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The accounting done by IRIX has traditionally been process oriented: a
  13.      new accounting record is produced for each process that has been run,
  14.      containing statistics about the resources used by that individual
  15.      process.  Although this is fine for sites with average workloads, it can
  16.      be too grainy for sites that have large amounts of traffic, with the
  17.      result that the accounting files quickly become too large and
  18.      unmanageable.  Since accounting is typically employed to charge
  19.      individual projects or departments for overall resource utilization, it
  20.      would often be sufficient to simply summarize the resource usage of an
  21.      entire login session or batch job.  This could cut down significantly on
  22.      the amount of disk space required for accounting data.  Therefore, IRIX
  23.      provides a feature to perform accounting by array session, in which each
  24.      accounting record that is written contains the accumulated statistics for
  25.      all of the processes that were part of that array session.  This is in
  26.      addition to process-level accounting, not in place of it; the two
  27.      accounting modes are separately controlled so it is possible to have
  28.      either, both, or neither style of accounting enabled.
  29.  
  30.      The data that is collected and reported for array sessions is a superset
  31.      of the data that is reported by the traditional process accounting
  32.      facility.  In particular, the following items are reported for array
  33.      sessions but not reported by traditional process accounting:
  34.  
  35.      *  Array session handle (see _a_r_r_a_y__s_e_s_s_i_o_n_s(5))
  36.      *  Service provider information (see _a_r_r_a_y__s_e_s_s_i_o_n_s(5))
  37.      *  Project ID (see _p_r_o_j_e_c_t_s(5))
  38.      *  Number of swaps
  39.      *  Number of bytes read, number of bytes written (separately)
  40.      *  Number of read requests, number of write requests
  41.      *  Time spent waiting for block I/O
  42.      *  Time spent waiting for raw I/O
  43.      *  Time spent waiting on the run queue
  44.  
  45.      Some of this information would also be useful for sites that otherwise
  46.      make use of process accounting.  Therefore, a second type of process
  47.      accounting, "extended process accounting", is provided by IRIX.  Again,
  48.      it is controlled separately from session accounting or traditional
  49.      process accounting.
  50.  
  51.      IRIX writes session and extended process accounting data using the System
  52.      Audit Trail (SAT) facility.  This is different from traditional process
  53.      accounting, which typically writes its data to the file /_v_a_r/_a_d_m/_p_a_c_c_t.
  54.      Audit data is collected directly from the kernel by the _s_a_t_d(1M) program,
  55.      then either written directly to files or else passed on to other filters
  56.      or postprocessing programs.  To include accounting records in the audit
  57.      data, it is necessary to enable the audit events ssssaaaatttt____pppprrrroooocccc____aaaacccccccctttt (for
  58.      extended process accounting records) and/or ssssaaaatttt____sssseeeessssssssiiiioooonnnn____aaaacccccccctttt (for session
  59.      accounting records).  This can be done using the _s_a_t_c_o_n_f_i_g(1M) or
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. eeeexxxxttttaaaacccccccctttt((((5555))))                                                          eeeexxxxttttaaaacccccccctttt((((5555))))
  71.  
  72.  
  73.  
  74.      _s_a_t__s_e_l_e_c_t(1M) commands.  If the audit facility is not being used for any
  75.      purpose other than accounting, no other events need to be enabled.  For
  76.      more information on configuring the audit facility, see the _I_R_I_X _A_d_m_i_n:
  77.      _B_a_c_k_u_p, _S_e_c_u_r_i_t_y, _a_n_d _A_c_c_o_u_n_t_i_n_g guide.
  78.  
  79.      Session accounting records can be written in two formats, differing only
  80.      in the treatment of service provider information.  In IRIX 6.4 and
  81.      earlier, the service provider information for an array session was always
  82.      exactly 64 bytes in length, while starting with IRIX 6.5 it could
  83.      potentially vary from 0 to 1024 bytes in length.  In "session accounting
  84.      format 1" (the system default, and the format supported in IRIX 6.4 and
  85.      earlier), exactly 64 bytes of service provider information will be
  86.      reported for each array session.  If in fact the array session has fewer
  87.      than 64 bytes of service provider information associated with it, then it
  88.      will be padded at the end with zeroes.  Likewise, if it has more than 64
  89.      bytes of service provider information, the 65th and subsequent bytes will
  90.      be truncated.  In "session accounting format 2", the exact number of
  91.      bytes of service provider information associated with the array session
  92.      will be reported, along with a field specifying this length.  In this
  93.      case, it is possible for session accounting records to have varying
  94.      lengths, but there will be no loss of data.  The session accounting
  95.      format can be changed dynamically by the superuser using the _a_r_s_c_t_l(2)
  96.      system call or the _x_a_c_t_l(1M) program.  It can also be set for boot time
  97.      be changing the kernel variable sssseeeessssssssaaaaffff using the _s_y_s_t_u_n_e(1M) program.
  98.  
  99.      Note that the utility programs for traditional SVR4 process accounting
  100.      (for example, _a_c_c_t_c_m_s, _a_c_c_t_m_e_r_g, and _t_u_r_n_a_c_c_t) do _n_o_t function with the
  101.      extended process accounting or session accounting data.  It is possible
  102.      to convert extended accounting data into the SVR4 format (see the
  103.      _a_c_c_t_c_v_t(1) program for details), but the metrics that are unique to
  104.      extended accounting will be lost.  Software to process unmodified
  105.      extended accounting data is available from independent software vendors.
  106.      The format of the audit data files themselves are described in the system
  107.      header files _s_y_s/_s_a_t._h and _s_y_s/_e_x_t_a_c_c_t._h.
  108.  
  109.      Like any accounting or monitoring package, the extended process
  110.      accounting and session accounting features do contribute to overall
  111.      system overhead.  For this reason, they are disabled in the kernel by
  112.      default.  To enable these features, use the _s_y_s_t_u_n_e(1M) program to modify
  113.      either or both of these variables:
  114.  
  115.      ddddoooo____sssseeeessssssssaaaacccccccctttt   Enables session accounting if non-zero
  116.  
  117.      ddddoooo____eeeexxxxttttppppaaaacccccccctttt   Enables extended process accounting if non-zero
  118.  
  119. IIIINNNNSSSSTTTTAAAALLLLLLLLAAAATTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  120.      The following steps are required to set up session or extended process
  121.      accounting:
  122.  
  123.      *  Enable session and/or extended process accounting in the kernel by
  124.         using the _s_y_s_t_u_n_e(1M) utility to set the ddddoooo____sssseeeessssssssaaaacccccccctttt and/or
  125.         ddddoooo____eeeexxxxttttppppaaaacccccccctttt parameters to non-zero values.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. eeeexxxxttttaaaacccccccctttt((((5555))))                                                          eeeexxxxttttaaaacccccccctttt((((5555))))
  137.  
  138.  
  139.  
  140.      *  Use the _i_n_s_t(1M) utility to install the _e_o_e._s_w._a_u_d_i_t subsystem from
  141.         your IRIX distribution media.  This will add the special components
  142.         required for the system audit trail facility to your system.  It will
  143.         be necessary to reboot the system after completing this step.
  144.  
  145.      *  Enable the audit facility in general by using the _c_h_k_c_o_n_f_i_g(1M)
  146.         utility as follows:
  147.  
  148.  
  149.              _cccc_hhhh_kkkk_cccc_oooo_nnnn_ffff_iiii_gggg _aaaa_uuuu_dddd_iiii_tttt _oooo_nnnn
  150.  
  151.      *  Use the _s_a_t_c_o_n_f_i_g program to enable the ssssaaaatttt____pppprrrroooocccc____aaaacccccccctttt and/or
  152.         ssssaaaatttt____sssseeeessssssssiiiioooonnnn____aaaacccccccctttt audit events.  If the audit facility is being used
  153.         only for accounting purposes, all other events can be turned off to
  154.         conserve disk space.
  155.  
  156. NNNNOOOOTTTTEEEESSSS
  157.      The format of the data stream generated by the System Audit Trail
  158.      facility changed between IRIX 6.2 and IRIX 6.4, then again between IRIX
  159.      6.4 and IRIX 6.5.  Therefore, software that was designed to read
  160.      accounting data from one of those earlier IRIX releases may not work with
  161.      more recent IRIX releases (and vice versa).  To help address this
  162.      situation, the _a_c_c_t_c_v_t(1) program can be used to convert data files or
  163.      even the audit data stream (when used as a filter) from one format to
  164.      another.
  165.  
  166. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  167.      acctcvt(1), audit(1M), sat_select(1M), satconfig(1M), satd(1M),
  168.      systune(1M), xactl(1M), arsctl(2), arsop(2), array_sessions(5),
  169.      audit_filters(5), projects(5).
  170.  
  171.      _I_R_I_X _A_d_m_i_n: _B_a_c_k_u_p, _S_e_c_u_r_i_t_y, _a_n_d _A_c_c_o_u_n_t_i_n_g
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.